home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2941 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: scinfo.u-nancy.fr!decarval
  2. From: Thierry.DeCarvalho@scinfo.u-nancy.fr (Thierry De Carvalho)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: The easiest C Program ever!!
  5. Date: 7 Feb 1996 08:07:00 GMT
  6. Organization: Universite Henri Poincare - Nancy (France)
  7.                Departement Informatique - ESIAL - ISIAL
  8. Distribution: world
  9. Message-ID: <4f9mj4$cmq@arcturus.ciril.fr>
  10. References: <311.6610T1012T295@in.net>
  11. NNTP-Posting-Host: pollux.scinfo.u-nancy.fr
  12. Mime-Version: 1.0
  13. Content-Type: text/plain; charset=iso-8859-1
  14. Content-Transfer-Encoding: 8bit
  15.  
  16. In article <311.6610T1012T295@in.net>, mave@in.net (John J. Maver, Jr.) writes:
  17. |> 
  18. |> 
  19. |>         How do I do a "Press enter to continue" in plain old ANSI C? I have
  20. |> got SAS6.56.
  21. |> 
  22. |>         My guess was:
  23. |> 
  24. |> 
  25. |>         printf("Please press enter to continue\n");
  26. |>         while ((c=getchar()) != '\n' )
  27. |>         ;
  28. |> 
  29. |> 
  30. |>         However, it never gets the character.
  31.  
  32. It's "normal", inputs are buffered; SAS/C provides a fonction which allows you
  33. to switch inputs into non-buffered mode. (look at the SAS/C guide files).
  34.  
  35.